import { request } from './request.js';
//获取车辆列表
export const getAmbulanceList = (params) => {
  return request({
    url: '/Maintain/SelectAmbulance/btn-ambsearch',
    method: 'get',
    params,
  });
};
//新增车辆
export const addAmbulance = (data) => {
  return request({
    url: '/Maintain/AddAmbulance/btn-ambadd',
    method: 'post',
    data,
  });
};
//修改车辆
export const editAmbulance = (data) => {
  return request({
    url: '/Maintain/UpdateAmbulance/btn-ambupdate',
    method: 'post',
    data,
  });
};
//删除车辆
export const delAmbulance = (params) => {
  return request({
    url: '/Maintain/DeleteAmbulance/btn-ambdelete',
    method: 'get',
    params,
  });
};

/** 首页 数据接口*/
// 车辆列表
export const GetAmbulanceInfo = (data) => {
  return request({
    url: '/Maintain/GetAmbulanceList',
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
    },
  });
};
// 车辆批量插入
export const AddAmbulanceList = (data) => {
  return request({
    url: '/Maintain/AddAmbulanceList/btn-ambload',
    method: 'post',
    data,
  });
};
// 车辆批量插入
export const AddAmbulanceListDrugs = (data, per) => {
  return request({
    url: `/Maintain/AddAmbulanceListDrugs/${per}`,
    method: 'post',
    data,
  });
};
